package com.fafa.tankgame02;

import java.util.Vector;

public class Hero extends Tank
{

    Vector<Shot> shots = new Vector<>();

    MyPanel  mp = null;
    public Hero(int x, int y)
    {
        super(x, y);
    }

    public void shotEnemyTank()
    {
        Shot shot = null;
        switch (getDirect()) {
            case 0:
                shot = new Shot(getX() + 15, getY() - 10, 0);
                break;
            case 1:
                shot = new Shot(getX() + 15, getY() + 60, 1);
                break;
            case 2:
                shot = new Shot(getX() - 10, getY() + 15, 2);
                break;
            case 3:
                shot = new Shot(getX() + 60, getY() + 15, 3);
                break;

        }
        //启动线程
        new Thread(shot).start();
        shots.add(shot);



    }
}
